
CFLAGS=-g -Wall -Wextra -Og -std=c89

all: testlist testcurs teststkl teststka testque \
        testtree testavl \
        testhash_sep testhash_quad \
		testheap testleft testbin

# List
testlist: testlist.o list.o
	gcc -o $@ $^
testcurs: testcurs.o cursor.o
	gcc -o $@ $^
teststkl: teststkl.o stackli.o
	gcc -o $@ $^
teststka: teststka.o stackar.o
	gcc -o $@ $^
testque: testque.o queue.o
	gcc -o $@ $^

# Tree
testtree: testtree.o tree.o
	gcc -o $@ $^
testavl: testavl.o avltree.o
	gcc -o $@ $^

# Hash Table
testhash_sep: testhash_sep.o hashsep.o
	gcc -o $@ $^
testhash_quad: testhash_quad.o hashquad.o
	gcc -o $@ $^

# Priority Queue
testheap: testheap.o binheap.o
	gcc -o $@ $^
testleft: testleft.o leftheap.o
	gcc -o $@ $^
testbin: testbin.o binomial.o
	gcc -o $@ $^

testlist.o: testlist.c
list.o: list.c
testcurs.o: testcurs.c
cursor.o: cursor.c
teststkl.o: teststkl.c
stackli.o: stackli.c
teststka.o: teststka.c
stackar.o: stackar.c
testque.o: testque.c
queue.o: queue.c

testtree.o: testtree.c
tree.o: tree.c
testavl.o: testavl.c
avltree.o: avltree.c

testhash_sep.o: testhash_sep.c
hashsep.o: hashsep.c
testhash_quad.o: testhash_quad.c
hashquad.o: hashquad.c

testheap.o: testheap.c
binheap.o: binheap.c
testleft.o: testleft.c
leftheap.o: leftheap.c
testbin.o: testbin.c
binomial.o: binomial.c
